<template>
    <el-time-picker class="search-time-picker"
        v-model="option.value"
        :picker-options="option.pickerOptions"
        :is-range="option.isRange"
        :arrow-control="option.arrowControl"
        :range-separator="option.rangeSeparator"
        :start-placeholder="option.startPlaceholder"
        :end-placeholder="option.endPlaceholder"
        :value-format="option.valueFormat"
        :clearable="false"
        size="small"
        @blur="blurSearchItem(option, index)"
        @change="changeTimeSearchItem">
    </el-time-picker>
</template>

<script>
import normalMixin from "../mixin/normalMixin";
export default {
    name: "searchTimePicker",
    mixins: [normalMixin],
    methods: {
        /**
         * Time 组件 change 事件触发
         * @param {(String|String[])} value time 组件返回数据
         */
        changeTimeSearchItem(value) {
            if (this.option.changeMethod) this.option.changeMethod(value);
        }
    }
}
</script>
